package com.xiashitech.agent.instrumentation.async.inst;

import com.google.auto.service.AutoService;
import com.xiashitech.agent.instrumentation.base.InstHelper;
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;

import java.util.Collections;
import java.util.List;

/**
 * 公共异步处理插桩模块
 * @author zhaoyk
 */
@AutoService(InstrumentationModule.class)
public class XSAsyncInstrumentationModule extends InstrumentationModule {

    public XSAsyncInstrumentationModule() {
        super("xs-async");
    }

    @Override
    public List<TypeInstrumentation> typeInstrumentations() {
        return Collections.singletonList(new XSCompletableFutureInstrumentation());
    }

    @Override
    public List<String> getAdditionalHelperClassNames() {
        return InstHelper.getHelperClasses();
    }

}
